//
//  GuideDetailViewController.m
//  项目一
//
//  Created by 王鑫 on 15/11/15.
//  Copyright (c) 2015年 王鑫. All rights reserved.
//

#import "GuideDetailViewController.h"
#import "GuideModel.h"
#define WIDTH self.view.frame.size.width
#define HEIGHT self.view.frame.size.height

@interface GuideDetailViewController ()

@end

@implementation GuideDetailViewController
#pragma mark - Method viewDidLoad
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    GuideModel *temp = self.model;
    NSLog(@"%@", temp);
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    [self.view addSubview:webView];
    NSString *str1 = @"http://cont.app.autohome.com.cn/autov5.0.0/content/news/newscontent-n";
    NSString *str2 = temp.idNew;
    NSString *str3 = @"-t0.json";
    NSString *string = [NSString stringWithFormat:@"%@%@%@", str1, str2, str3];
    NSURL *url = [NSURL URLWithString:string];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [webView loadRequest:request];
    [webView release];
}
#pragma mark - Method didReceiveMemoryWarning
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
